<!-- $Id:course_list 	Author: liuricheng 	Time: 	2014-07-09 [modify]	$ -->

<table id="mytab"  border="1" class="t1" width="100%">
    <tr class="a1">
      <td width="30px">
      	全选
      	<input type="checkbox" onclick="alert('全选');">
      </td>
      <td width="30px">{$lang.number}</td>
      <td>{$lang.course_name}</td>
      <td>缩略图</td>
      <td width="100px" align="center">提供商</td>
      <td width="100px" align="center">所属分类</td>
      <td width="30px" align="center">{$lang.is_new}</td>
      <td width="30px" align="center">{$lang.is_hot}</td>
      <td width="30px" align="center">上架</td>
      <td width="30px" align="center">排序</td>
      <td width="100px" align="center">{$lang.createdtime}</td>
      <td width="30px" align="center">价值</td>
      <td align="center">{$lang.action}</td>
    </tr>		   
    <volist name="courselist" id="vo">
    	<tr id="tr_{$vo.id}" class="value">
	      <td><input type="checkbox" id="{$vo.id}"></td>
	      <td>{$vo.id}</td>
	      <td>
	      	<span class="blue">{$vo.name}</span>
	      </td>
		  <td width="50px">
				<img width="50" height="45" style="border:1px solid #adadad;padding:3px; margin:5px; cursor:pointer;" src="__PUBLIC__/Upload/images/{$vo.thum_img}"/>
	      </td>
	      <td align="center">
	      	<span  class="green pointer">
	      		<a>
	      			<if condition="($vo.supplier_name eq null) or ($vo.supplier_name eq '')">
	      				匿名
	      			<else/>
	      				{$vo.supplier_name}
	      			</if>
	      		</a>
	      	</span>
	      </td>
	      <td align="center">
	      	<span  class="green pointer"><a>{$vo.cat_name}</a></span>
	      </td>
	      <td>
	      		<img class="pointer" onclick="listTable.toggle(this, 'new', {$vo.id});" src="__PUBLIC__/image/<if condition="$vo.new eq 1">bg_yes.gif<else/>bg_no.gif</if>"/>
	      </td>
	      <td>
	      		<img class="pointer" onclick="listTable.toggle(this, 'hot', {$vo.id});" src="__PUBLIC__/image/<if condition="$vo.hot eq 1">bg_yes.gif<else/>bg_no.gif</if>"/>
		  </td>
		    <td>
	      		<img class="pointer" onclick="listTable.changeStatus(this, 'invalid', {$vo.id});" src="__PUBLIC__/image/<if condition="$vo.invalid eq 0">bg_yes.gif<else/>bg_no.gif</if>"/>
		  </td>
		  <!-- 排序 -->
	      <td align="center">
	      	<span onclick="listTable.edit(this, 'sort', {$vo.id})">{$vo.sort}</span>
	      </td>
	      <td align="center">{$vo.ctime|date='Y-m-d  h:m:s',###}</td>
	      <!-- 所需积分 -->
	      <td align="center" width="30px">
	      	<span onclick="listTable.edit(this, 'integration', {$vo.id})">{$vo.integration}</span>
	      </td>
	    <td width="200px" align="center">
	       	<div class="action">			       		
	      		<span>
	      			<a href="__APP__/Audio/audio_list?id={$vo.id}" class="list" title="MP3列表"></a>
	      			<a href="__APP__/Audio/add_audio?id={$vo.id}" class="add" title="{$lang.add_mp3}"></a>
	      			<a href="javascript:void(0);" data="{$vo.id}" class="del" title="删除课程"></a>
	      			<a href="__APP__/Course/updatecourse/?id={$vo.id}" class="mod" title="修改课程"></a>
	      			<!--<a href="__APP__/Course/create_setting_file?id={$vo.id}" class="config" title="配置文件"></a>-->
	      		</span>
	       	</div>
	    </td>
	</tr>
    </volist>		   
</table>

<include file="Library:paginator"/>

<script>	
	//ajax 分页
	jQuery(function($) {
		// 处理输入跳转链接
		var pageNum	= null;
		$('#goto-input').blur(function(){
			pageNum = $(this).val();
		});	
		$('#goto').click(function(){
			if(pageNum == null || pageNum == ''){
				alert("跳转的页数不能为空");return;
			}
			$(this).attr('href', $(this).attr('data') + pageNum);
		});
		
		$('#page a').click(function(){
			// ajax request for data
			$.ajax({
				url: $(this).attr('href') + '',
				dataType: "html",
				type: "get",
				cache: false,
				async:true,
				success: function(html){
					$("#content").html(html);
					return false;
				}
			});
			return false;
		});
	});
</script>










